textFile = open("D:\\Hello.txt","w")
str = input("输入一段文字:")
textFile.write(str)